package com.ydl.shopping.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/** 角色菜单表 */
@Data
@TableName("tb_role_menu")
@Schema(name = "角色菜单表")
public class TbRoleMenu {
    /** 主键 */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableId("id")
    @Schema(description = "主键")
    private Long id;

    /** 角色编号 */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField("role_id")
    @Schema(description = "角色编号")
    private Long roleId;

    /** 权限编号 */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField("menu_id")
    @Schema(description = "权限编号")
    private Long menuId;

    public TbRoleMenu() {
    }

    public TbRoleMenu(Long roleId, Long menuId) {
        this.roleId = roleId;
        this.menuId = menuId;
    }
}
